/**
 *
 */
package jp.seraph.jsade.model;

import jp.seraph.jsade.perceptor.GyroPerceptor;

/**
 * GyroValueのデフォルト実装
 *
 */
public class DefaultGyroValue implements GyroValue {
    public DefaultGyroValue(double x, double y, double z){
        mX = x;
        mY = y;
        mZ = z;
    }

    public DefaultGyroValue(GyroPerceptor aBase){
        this(aBase.getX(), aBase.getY(), aBase.getZ());
    }

    public DefaultGyroValue(GyroValue aBase){
        this(aBase.getX(), aBase.getY(), aBase.getZ());
    }

    private double mX;
    private double mY;
    private double mZ;

    /**
     *
     * @see jp.seraph.jsade.model.GyroValue#add(jp.seraph.jsade.model.GyroValue)
     */
    
    public GyroValue add(GyroValue aValue) {
        return new DefaultGyroValue(aValue.getX() + this.getX(), aValue.getY() + this.getY(),aValue.getZ() + this.getZ());
    }

    /**
     *
     * @see jp.seraph.jsade.model.GyroValue#getX()
     */
    
    public double getX() {
        return mX;
    }

    /**
     *
     * @see jp.seraph.jsade.model.GyroValue#getY()
     */
    
    public double getY() {
        return mY;
    }

    /**
     *
     * @see jp.seraph.jsade.model.GyroValue#getZ()
     */
    
    public double getZ() {
        return mZ;
    }

}
